package com.huawei.zyb.taskManager.application.task.dto;

import com.huawei.zyb.taskManager.domain.task.valueobject.TaskLevel;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskPriority;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskStatus;

import java.time.LocalDateTime;

/**
 * 任务数据传输对象
 */
public class TaskDTO {
    
    private Long id;
    private String title;
    private String description;
    private TaskStatus status;
    private TaskPriority priority;
    private TaskLevel level;
    private Integer progress;
    private Double estimatedHours;
    private Double actualHours;
    private Long requirementId;
    private String requirementTitle;  // 需求标题
    private String assigneeId;
    private Long parentTaskId;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    public TaskDTO() {
    }
    
    public TaskDTO(Long id, String title, String description, TaskStatus status,
                   TaskPriority priority, TaskLevel level, Integer progress,
                   Double estimatedHours, Double actualHours, Long requirementId,
                   String requirementTitle, String assigneeId, Long parentTaskId, 
                   LocalDateTime createdAt, LocalDateTime updatedAt) {
        this.id = id;
        this.title = title;
        this.description = description;
        this.status = status;
        this.priority = priority;
        this.level = level;
        this.progress = progress;
        this.estimatedHours = estimatedHours;
        this.actualHours = actualHours;
        this.requirementId = requirementId;
        this.requirementTitle = requirementTitle;
        this.assigneeId = assigneeId;
        this.parentTaskId = parentTaskId;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public TaskStatus getStatus() {
        return status;
    }
    
    public void setStatus(TaskStatus status) {
        this.status = status;
    }
    
    public TaskPriority getPriority() {
        return priority;
    }
    
    public void setPriority(TaskPriority priority) {
        this.priority = priority;
    }
    
    public TaskLevel getLevel() {
        return level;
    }
    
    public void setLevel(TaskLevel level) {
        this.level = level;
    }
    
    public Integer getProgress() {
        return progress;
    }
    
    public void setProgress(Integer progress) {
        this.progress = progress;
    }
    
    public Double getEstimatedHours() {
        return estimatedHours;
    }
    
    public void setEstimatedHours(Double estimatedHours) {
        this.estimatedHours = estimatedHours;
    }
    
    public Double getActualHours() {
        return actualHours;
    }
    
    public void setActualHours(Double actualHours) {
        this.actualHours = actualHours;
    }
    
    public Long getRequirementId() {
        return requirementId;
    }
    
    public void setRequirementId(Long requirementId) {
        this.requirementId = requirementId;
    }
    
    public String getRequirementTitle() {
        return requirementTitle;
    }
    
    public void setRequirementTitle(String requirementTitle) {
        this.requirementTitle = requirementTitle;
    }
    
    public String getAssigneeId() {
        return assigneeId;
    }
    
    public void setAssigneeId(String assigneeId) {
        this.assigneeId = assigneeId;
    }
    
    public Long getParentTaskId() {
        return parentTaskId;
    }
    
    public void setParentTaskId(Long parentTaskId) {
        this.parentTaskId = parentTaskId;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
    
    @Override
    public String toString() {
        return "TaskDTO{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", priority=" + priority +
                ", level=" + level +
                ", progress=" + progress +
                ", estimatedHours=" + estimatedHours +
                ", actualHours=" + actualHours +
                ", requirementId=" + requirementId +
                ", requirementTitle='" + requirementTitle + '\'' +
                ", assigneeId=" + assigneeId +
                ", parentTaskId=" + parentTaskId +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}